import unittest
import warnings
from net_project_tools.xb_achievement_page import XbAchievementPage
import user_data


class NetAchevementTest(unittest.TestCase):

    def setUp(self):
        warnings.simplefilter('ignore', ResourceWarning)


    def tearDown(self):
        self.page.logout()

    def test_chengTest(self):   #发布成功

           self.page = XbAchievementPage()
           self.page.login(*user_data.student1)
           self.page.enter_project()
           self.page.enter_tools('成果')
           self.page.release_achievement()

    def test_PiTest(self):     #批阅成果
        self.page = XbAchievementPage()
        self.page.login(*user_data.project_admin)
        self.page.enter_project()
        self.page.enter_tools('成果')
        self.page.marking_achievement()

